Skip to content

feat: 原样重发与回退的请求归入原会话 - #7

Merged
Mag1cFall merged 2 commits into
Mag1cFall:mainfrom
XUANJI233:feat/conversation-resend-rewind
Nov 18, 2026
Merged

Mag1cFall merged 2 commits into
Mag1cFall:mainfrom
XUANJI233:feat/conversation-resend-rewind

Conversation

@XUANJI233

@XUANJI233 XUANJI233 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

为了修复 #6 的问题

额外保存了最后几条消息的摘要链用于匹配会话(可设置),使得会话回退或者重发可以被判定为同一个会话id,使得可以利用缓存

大多数都是文档和i18n的修改
实际修改文件
internal/config/config.go
internal/service/service.go
internal/service/conversation.go

还有
web/src/features/settings/schema.ts
web/src/features/settings/SettingsPage.tsx

在claude的强烈要求下保留了测试文件 internal/service/generate_test.go

- 多于一条消息的请求成功后原样重发时归入原会话,沿用会话 ID 与各条消息的时间;只有一条消息的请求保持原规则
- 会话记录保存链位置之前最后 CONVERSATION_REWIND_DEPTH 项链摘要,没有会话直接匹配且本次多于一条消息时,回退或改写不超过保留条数的请求退回原会话继续使用
- 新增配置项 CONVERSATION_REWIND_DEPTH(默认 3,0 为不限制),设置页归入调度分区

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 13:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@XUANJI233

XUANJI233 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

最近有些太忙了,没有手动写代码,用的Fable 5.2
不过大概都看过了,应该没有问题?

@Mag1cFall
Mag1cFall merged commit ebb3b28 into Mag1cFall:main Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants